	clear
	set more off
	set type double 
	set logtype text
	capture log close

	
	use "EDCC_tables", clear

  
	macro def X head_male_hh head_age_hh head_ed_hh magey_mom meduc_mom hhsize_hh tlu_hh goodroof_hh elect_hh area_ha_hh poor log_dist20k
  
	macro def X_int int_head_age_hh int_head_ed_hh int_magey_mom int_meduc_mom int_hhsize_hh int_tlu_hh int_goodroof_hh int_elect_hh int_area_ha_hh int_log_dist10k int_log_dist20k int_region2 int_region3 int_region4
  
 
	xtset id round
	
*Table 2   
	*panel A
	xtreg food_insecure ib0.year_survey int_PSNP [aweight=weight], fe cluster( kebelle)
	estimate store m1
	xtreg food_insecure ib0.year_survey int_PSNP ib1.locust [aweight=weight], fe cluster( kebelle)
	estimate store m2
	xtreg food_gap ib0.year_survey int_PSNP [aweight=weight], fe cluster( kebelle)
	estimate store m3
	xtreg food_gap ib0.year_survey int_PSNP ib1.locust [aweight=weight], fe cluster( kebelle)
	estimate store m4
	xtreg food_insecure ib0.year_survey int_PSNP ib1.locust, fe cluster( kebelle)
	estimate store m5
	xtreg food_gap ib0.year_survey int_PSNP ib1.locust, fe cluster( kebelle)
	estimate store m6
	estout m1 m2 m3 m4 m5 m6, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4 m5 m6  using "table2.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf replace nogaps
	
	*panel B 
	xtreg food_insecure ib0.year_survey int_PSNP_pay100 [aweight=weight], fe cluster( kebelle)
	estimate store m1
	xtreg food_insecure ib0.year_survey int_PSNP_pay100 ib1.locust [aweight=weight], fe cluster( kebelle)
	estimate store m2
	xtreg food_gap ib0.year_survey int_PSNP_pay100 [aweight=weight], fe cluster( kebelle)
	estimate store m3
	xtreg food_gap ib0.year_survey int_PSNP_pay100 ib1.locust [aweight=weight], fe cluster( kebelle)
	estimate store m4
	xtreg food_insecure ib0.year_survey int_PSNP_pay100 ib1.locust, fe cluster( kebelle)
	estimate store m5
	xtreg food_gap ib0.year_survey int_PSNP_pay100 ib1.locust, fe cluster( kebelle)
	estimate store m6
	estout m1 m2 m3 m4 m5 m6 , cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4 m5 m6 using "table2.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf append nogaps
	
	*panel C
	xtreg food_insecure ib0.year_survey int_PSNP_woreda [aweight=weight], fe cluster( kebelle)
	estimate store m1
	xtreg food_insecure ib0.year_survey int_PSNP_woreda ib1.locust [aweight=weight], fe cluster( kebelle)
	estimate store m2
	xtreg food_gap ib0.year_survey int_PSNP_woreda  [aweight=weight], fe cluster( kebelle)
	estimate store m3
	xtreg food_gap ib0.year_survey int_PSNP_woreda ib1.locust [aweight=weight], fe cluster( kebelle)
	estimate store m4
	xtreg food_insecure ib0.year_survey int_PSNP_woreda ib1.locust, fe cluster( kebelle)
	estimate store m5
	xtreg food_gap ib0.year_survey int_PSNP_woreda ib1.locust, fe cluster( kebelle)
	estimate store m6
	estout m1 m2 m3 m4 m5 m6, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4 m5 m6 using "table2.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf append nogaps

	
*Table 3 
	xtreg food_insecure ib0.year_survey int_PSNP_woreda ib1.locust [aweight=weight] if poor==1, fe cluster( kebelle)
	estimate store m1
	xtreg food_insecure ib0.year_survey int_PSNP_woreda ib1.locust [aweight=weight] if poor==0, fe cluster( kebelle)
	estimate store m2
	xtreg food_gap ib0.year_survey int_PSNP_woreda ib1.locust [aweight=weight] if poor==1, fe cluster( kebelle)
	estimate store m3
	xtreg food_gap ib0.year_survey int_PSNP_woreda ib1.locust [aweight=weight] if poor==0, fe cluster( kebelle)
	estimate store m4
	estout m1 m2 m3 m4, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4  using "table3.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf replace nogaps
	
	
*Table 4
	xtreg food_insecure ib0.year_survey int_PSNP_woreda ib1.locust [aweight=weight] if remote==1, fe cluster( kebelle)
	estimate store m1
	xtreg food_insecure ib0.year_survey int_PSNP_woreda ib1.locust [aweight=weight] if remote==0, fe cluster( kebelle)
	estimate store m2
	xtreg food_gap ib0.year_survey int_PSNP_woreda ib1.locust [aweight=weight] if remote==1, fe cluster( kebelle)
	estimate store m3
	xtreg food_gap ib0.year_survey int_PSNP_woreda ib1.locust [aweight=weight] if remote==0, fe cluster( kebelle)
	estimate store m4
	estout m1 m2 m3 m4, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4  using "table4.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf replace nogaps
	

*Table 5	
	xtreg food_insecure ib0.year_survey int_PSNP [aweight=weight] if mea_q11_2==1 , fe cluster( kebelle)
	estimate store m1
	xtreg food_insecure ib0.year_survey int_PSNP [aweight=weight] if mea_q11_2==2, fe cluster( kebelle)
	estimate store m2
	xtreg food_gap ib0.year_survey int_PSNP [aweight=weight] if mea_q11_2==1 , fe cluster( kebelle)
	estimate store m3
	xtreg food_gap ib0.year_survey int_PSNP [aweight=weight] if mea_q11_2==2 , fe cluster( kebelle)
	estimate store m4
	estout m1 m2 m3 m4, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4  using "table5.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf replace nogaps
	
	
*Table 6	
	reg mecc_q16  PSNP_30days $X i.region  [aweight=weight] if year_survey==1, cluster(kebelle) 
	estimate store m1
	reg mecc_q17  PSNP_30days $X  i.region [aweight=weight] if year_survey==1, cluster(kebelle) 
	estimate store m2
	reg mecc_q18  PSNP_30days $X  i.region  [aweight=weight] if year_survey==1, cluster(kebelle) 
	estimate store m3
	reg mecc_q19  PSNP_30days $X  i.region  [aweight=weight] if year_survey==1, cluster(kebelle) 
	estimate store m4
	reg mecc_q20  PSNP_30days $X  i.region  [aweight=weight] if year_survey==1, cluster(kebelle) 
	estimate store m5
	reg mecc_q22  PSNP_30days $X  i.region [aweight=weight]  if year_survey==1, cluster(kebelle) 
	estimate store m6
	estout m1 m2 m3 m4 m5 m6, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4 m5 m6  using "table6.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf replace nogaps
	
	
*Table 7
	xtreg dds_mom ib0.year_survey int_PSNP ib1.locust [aweight=weight], fe cluster( kebelle)
	estimate store m1
	xtreg mindds_mom ib0.year_survey int_PSNP ib1.locust [aweight=weight], fe cluster( kebelle)
	estimate store m2
	xtreg dds_child ib0.year_survey int_PSNP ib1.locust if age_cat_child>1 & age_cat_child<5 [aweight=weight], fe cluster( kebelle)
	estimate store m3
	xtreg mindds_child ib0.year_survey int_PSNP ib1.locust if age_cat_child>1 & age_cat_child<5 [aweight=weight], fe cluster( kebelle)
	estimate store m4
	estout m1 m2 m3 m4, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4  using "table7.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N) rtf replace nogaps
	
	
*Table 8 	 
	xtreg animal_source_mom ib0.year_survey int_PSNP ib1.locust [aweight=weight], fe cluster( kebelle)
	estimate store m1
	xtreg veg_fruits_mom ib0.year_survey int_PSNP ib1.locust [aweight=weight], fe cluster( kebelle)
	estimate store m2 
	xtreg animal_source_child ib0.year_survey int_PSNP ib1.locust if age_cat_child>1 & age_cat_child<5 [aweight=weight] , fe cluster( kebelle)
	estimate store m3
	xtreg veg_fruits_child ib0.year_survey int_PSNP ib1.locust if age_cat_child>1 & age_cat_child<5 [aweight=weight] , fe cluster( kebelle)
	estimate store m4 
	estout m1 m2 m3 m4, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4  using "table8.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N) rtf replace nogaps
	
	
*Appendix tables	
*Table A6	
	*panel A
	xtlogit food_insecure ib0.year_survey int_PSNP ib1.locust [iweight=weight], fe
	estimate store m1
	xtpoisson food_gap ib0.year_survey int_PSNP ib1.locust [iweight=weight], fe vce(robust)
	estimate store m2
	xtlogit food_insecure ib0.year_survey int_PSNP ib1.locust, fe
	estimate store m3
	xtpoisson food_gap ib0.year_survey int_PSNP ib1.locust, fe vce(robust)
	estimate store m4
	estout m1 m2 m3 m4, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4  using "tableA6.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf replace nogaps
	
	*panel B
	xtlogit food_insecure ib0.year_survey int_PSNP_pay100 ib1.locust [iweight=weight], fe
	estimate store m1
	xtpoisson food_gap ib0.year_survey int_PSNP_pay100 ib1.locust [iweight=weight], fe vce(robust)
	estimate store m2
	xtlogit food_insecure ib0.year_survey int_PSNP_pay100 ib1.locust, fe
	estimate store m3
	xtpoisson food_gap ib0.year_survey int_PSNP_pay100 ib1.locust, fe vce(robust)
	estimate store m4
	estout m1 m2 m3 m4, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4  using "tableA6.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf append nogaps
	
	*panel C
	xtlogit food_insecure ib0.year_survey int_PSNP_woreda ib1.locust, fe
	estimate store m1
	xtlogit food_insecure ib0.year_survey int_PSNP_woreda ib1.locust [iweight=weight], fe
	estimate store m2
	xtpoisson food_gap ib0.year_survey int_PSNP_woreda ib1.locust, fe vce(robust)
	estimate store m3
	xtpoisson food_gap ib0.year_survey int_PSNP_woreda ib1.locust [iweight=weight], fe vce(robust)
	estimate store m4
	estout m1 m2 m3 m4, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4  using "tableA6.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf append nogaps

	
*Table A7 
	*panel A
	xtreg food_insecure ib0.year_survey int_PSNP [aweight=weight] if mea_q12==1, fe cluster( kebelle)
	estimate store m1
	xtreg food_gap ib0.year_survey int_PSNP [aweight=weight] if mea_q12==1, fe cluster( kebelle)
	estimate store m2
	xtreg food_insecure ib0.year_survey int_PSNP if mea_q12==1, fe cluster( kebelle)
	estimate store m3
	xtreg food_gap ib0.year_survey int_PSNP if mea_q12==1, fe cluster( kebelle)
	estimate store m4
	estout m1 m2 m3 m4, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4  using "tableA7.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf replace nogaps

	*panel B
	xtreg food_insecure ib0.year_survey int_PSNP_pay100 [aweight=weight] if mea_q12==1, fe cluster( kebelle)
	estimate store m1
	xtreg food_gap ib0.year_survey int_PSNP_pay100 [aweight=weight] if mea_q12==1, fe cluster( kebelle)
	estimate store m2
	xtreg food_insecure ib0.year_survey int_PSNP_pay100 if mea_q12==1, fe cluster( kebelle)
	estimate store m3
	xtreg food_gap ib0.year_survey int_PSNP_pay100 if mea_q12==1, fe cluster( kebelle)
	estimate store m4
	estout m1 m2 m3 m4, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4  using "tableA7.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf append nogaps
	
	*panel C
	xtreg food_insecure ib0.year_survey int_PSNP_woreda [aweight=weight] if mea_q12==1, fe cluster( kebelle)
	estimate store m1
	xtreg food_gap ib0.year_survey int_PSNP_woreda [aweight=weight] if mea_q12==1, fe cluster( kebelle)
	estimate store m2
	xtreg food_insecure ib0.year_survey int_PSNP_woreda if mea_q12==1, fe cluster( kebelle)
	estimate store m3
	xtreg food_gap ib0.year_survey int_PSNP_woreda if mea_q12==1, fe cluster( kebelle)
	estimate store m4
	estout m1 m2 m3 m4, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4  using "tableA7.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf append nogaps


***Excluding Oromia 

*Table A8
	*panel A
	xtreg food_insecure ib0.year_survey int_PSNP [aweight=weight] if region!=4, fe cluster( kebelle)
	estimate store m1
	xtreg food_insecure ib0.year_survey int_PSNP ib1.locust [aweight=weight] if region!=4, fe cluster( kebelle)
	estimate store m2
	xtreg food_gap ib0.year_survey int_PSNP [aweight=weight] if region!=4, fe cluster( kebelle)
	estimate store m3
	xtreg food_gap ib0.year_survey int_PSNP ib1.locust [aweight=weight] if region!=4, fe cluster( kebelle)
	estimate store m4
	xtreg food_insecure ib0.year_survey int_PSNP ib1.locust if region!=4, fe cluster( kebelle)
	estimate store m5
	xtreg food_gap ib0.year_survey int_PSNP ib1.locust if region!=4, fe cluster( kebelle)
	estimate store m6
	estout m1 m2 m3 m4 m5 m6, cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4 m5 m6  using "tableA8.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf replace nogaps

	*panel B
	xtreg food_insecure ib0.year_survey int_PSNP_pay100 [aweight=weight] if region!=4, fe cluster( kebelle)
	estimate store m1
	xtreg food_insecure ib0.year_survey int_PSNP_pay100 ib1.locust [aweight=weight] if region!=4, fe cluster( kebelle)
	estimate store m2
	xtreg food_gap ib0.year_survey int_PSNP_pay100 [aweight=weight] if region!=4, fe cluster( kebelle)
	estimate store m3
	xtreg food_gap ib0.year_survey int_PSNP_pay100 ib1.locust [aweight=weight] if region!=4, fe cluster( kebelle)
	estimate store m4
	xtreg food_insecure ib0.year_survey int_PSNP_pay100 ib1.locust if region!=4, fe cluster( kebelle)
	estimate store m5
	xtreg food_gap ib0.year_survey int_PSNP_pay100 ib1.locust if region!=4, fe cluster( kebelle)
	estimate store m6
	estout m1 m2 m3 m4 m5 m6 , cells(b(star fmt(3)) se(par fmt(3))) starlevels( * 0.10 ** 0.05 *** 0.010) stat(r2 N)
	esttab m1 m2 m3 m4 m5 m6 using "tableA8.rtf",  b(%9.3f) se(%9.3f) star(* 0.10 ** 0.05 *** 0.01) ///
	stat(r2 N, fmt(%9.3f %9.0g)) rtf append nogaps
	